package com.springboot.demo.service;

import com.springboot.demo.entity.BorrowMsg;
import com.springboot.demo.mapper.BorrowManageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BorrowMsgService {
    @Autowired
    BorrowManageMapper borrowManageMapper;

    public List<BorrowMsg> getAllBorrowMsg(){
        return borrowManageMapper.getBorrowingbook();
    }

    public void setSuc(String phone,long bookid,String starttime){
        borrowManageMapper.setSuccess(phone,bookid,starttime);
    }

    public void changebooksuc(long bookid){
        borrowManageMapper.changebooksuc(bookid);
    }

    public void changebookfail(long bookid){
        borrowManageMapper.changebookfail(bookid);
    }

    public void readernumminus1(String phone){
        borrowManageMapper.readernumminus1(phone);
    }

    public void setFa(String phone,long bookid,String starttime){
        borrowManageMapper.setFail(phone,bookid,starttime);
    }
}
